import serves from './axios'
import store from '@/store/index'

// 详情界面

// 获取详情界面列表
export function getDetailsPageList() {
    return serves({
        url: '/admin/getDetailsPageList',
        method: 'post',
        data: {
            token: store.state.token
        }
    })
}

// 新增详情界面
export function addDetailsPage(data) {
    return serves({
        url: '/admin/addDetailsPage',
        method: 'post',
        data: {
            token: store.state.token,
            ...data
        }
    })
}

// 获取详情界面信息
export function getDetailsPageInfo(id) {
    return serves({
        url: '/admin/getDetailsPageInfo',
        method: 'post',
        data: {
            token: store.state.token,
            id
        }
    })
}

// 修改详情界面信息
export function updateDetailsPage(data) {
    return serves({
        url: '/admin/updateDetailsPage',
        method: 'post',
        data: {
            token: store.state.token,
            ...data
        }
    })
}

// 删除详情界面信息
export function delDetailsPage(id) {
    return serves({
        url: '/admin/delDetailsPage',
        method: 'post',
        data: {
            token: store.state.token,
            id
        }
    })
}